import React, { Component } from 'react';
import { Button } from 'antd-mobile'

class bottom extends Component {



    render() {
        return (
            <div className='bottom'>
                <div className='bottom-left'></div>
                <div className='bottom-right'>
                    <div className='addprice'>总价:¥
                        <span>
                            {
                                this.props.shoplist.reduce((sum, item, index) => {
                                    return sum = sum + item.salesPrice.value/1
                                }, 0)
                            }
                        </span>
                    </div>
                    <Button block shape='rounded' color='danger'>
                        去结算({this.props.shoplist.length})
                    </Button>
                </div>
            </div>
        );
    }
}

export default bottom;